<?php
/**
 * 路由
 * @author GL
 * @date 2018.8.23
 */

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/

//登陆
Route::group([ 'namespace' => 'Crm'], function () {
    Route::get('/login', ['uses' => 'LoginController@login']);
    Route::post('/login/check', ['uses' => 'LoginController@checkLogin']);
});


//路由跳转
Route::any('/', function () {
    return redirect('/login');
});

//路由群组
Route::group([ 'namespace' => 'Crm', 'middleware' => 'auth.crm'], function () {
    
    $routeDir = __DIR__ . '/Routes/';
    require($routeDir . 'crm.php');
});




